﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IceDog.Log4net.Test.Common
{
    /// <summary>
    /// 日志信息模型
    /// </summary>
    class LogMessage
    {
        /// <summary>
        /// 操作人ID
        /// </summary>
        public int OperatorId { get; set; }
        /// <summary>
        /// 操作对象
        /// </summary>
        public string Operand { get; set; }
        /// <summary>
        /// 动作类型
        /// </summary>
        public int ActionType { get; set; }
        /// <summary>
        /// 日志消息
        /// </summary>
        public string Message { get; set; }
        /// <summary>
        /// IP地址
        /// </summary>
        public string Ip { get; set; }
        /// <summary>
        /// 机器名
        /// </summary>
        public string MachineName { get; set; }
        /// <summary>
        /// 浏览器
        /// </summary>
        public string Browser { get; set; }

        public LogMessage()
        {
            
        }
        public LogMessage(int operatorId, string operand, int actionType, string message) : this()
        {
            OperatorId = operatorId;
            Operand = operand;
            ActionType = actionType;
            Message = message;
            Ip = null;
            MachineName = null;
            Browser = null;
        }
        public LogMessage(int operatorId, string operand, int actionType, string message, string ip, string machineName, string browser):this()
        {
            OperatorId = operatorId;
            Operand = operand;
            ActionType = actionType;
            Message = message;
            Ip = ip;
            MachineName = machineName;
            Browser = browser;
        }
    }
}
